package eventStrategies;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;

import controller.IController;
import stars.StarModel;
import eventManager.AppEvent;
import eventManager.EventPortal;
import eventManager.IEventListener;
import events.ReplyGetStarTypeEvent;

public class GetStarTypeStrategy implements IEventListener {

	private HashSet<String> eventTypes = new HashSet<String>();	
	
	public GetStarTypeStrategy() {
		eventTypes.add("getStarType");
	}

	public void handleEvent(AppEvent event) {
		Object[] obj = event.getEventObjects();
		StarModel fullModel = (StarModel) obj[0];
		EventPortal.queueEvent(new ReplyGetStarTypeEvent(event.getSender(), fullModel.getType()));
		
		//GetStarTypeEvent fullEvent = (GetStarTypeEvent) event;
		//controller.processOutgoingEvent(new ReplyGetStarTypeEvent(fullEvent.sender, fullModel.getType()));
	}

	public Set<String> getEventTypes() {		
		return eventTypes;
	}

}
